package com.itheima.homework;

public class Test2 {
    public static void main(String[] args) {
        System.out.println("两个整数中较大值为: "+max(4,5));
        System.out.println("三个整数中最大值为: "+max(4,5,6));
    }

    public static int max(int a, int b) {
        int max = a > b ? a : b;
        return max;
    }

    public static int max(int a, int b, int c) {
        int i = a > b ? a : b;
        int max = i > c ? i : c;
        return max;
    }
}
